package pe.com.bbva.ge.persistencia.jdbc.oracle;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate;

import pe.com.bbva.ge.persistencia.jdbc.BaseJDBC;

public abstract class BaseJDBCOracle implements BaseJDBC {

	/**
	 * 
	 */
	private static final long serialVersionUID = -924248393992439744L;

	@Autowired
	private JdbcTemplate jdbcTemplate;
	
	protected final static Logger logger = LogManager.getLogger(BaseJDBCOracle.class);
	
	@Value("${jdbc.schema}")
	private String schema;
	
	@Override
	public String obtenerObjetoBBDD(String objetoBBDD) {
		StringBuilder str = new StringBuilder();
		str.append(schema).append(".").append(objetoBBDD);
		return str.toString();
	}

	protected JdbcTemplate getJdbcTemplate() {
		return jdbcTemplate;
	}
	
}
